#pragma once
#include "FSMState.h"
#include "StringHash.h"
#include "Subscriber.h"
#include "collisionObserver.h"

class PhysicsBody;

class GameState: public FSMState, public CollisionObserver
{
public:
	GameState(const ObjectId& stateId);
	~GameState();
	virtual void onEnter();
	virtual void onLeave() {}
	virtual void onFrame(real frametime, real timestep);
	void CollisionEvent(const CollisionData& collision);

private:
	void checkBallHorizontalVelocity();
	SubscriberHelper<CollisionObserver>* m_collisionSubscriber;
	unsigned int m_rebounds;
	bool m_StaticBumper;
};
